import { defineAsyncComponent } from 'vue'

const map = {}
const modules = import.meta.glob('./*.vue', { eager: true }) //import.meta.globEager('./*.vue')
Object.keys(modules).forEach(file => {
  const modulesName = file.replace('./', '').replace('.vue', '')
  map[modulesName] = modules[file].default
})
// 
const BaseMultiselect = defineAsyncComponent(() =>
  import('./base-select/BaseMultiselect.vue')
)

const globalComponents = {
  ...map,
  BaseMultiselect
}
export default globalComponents
